原贴地址：[http://blog.leanote.com/post/dawnmagnet/lc160](http://blog.leanote
.com/post/dawnmagnet/lc160)
# 题目
<p>给你两个单链表的头节点&nbsp;<code>headA</code> 和 <code>headB</code> 
，请你找出并返回两个单链表相交的起始节点。如果两个链表没有交点，返回 
<code>null</code> 。</p>
<p>图示两个链表在节点 <code>c1</code> 开始相交<strong>：</strong></p>
![title](https://leanote.com/api/file/getImage?fileId=60b99c54ab644178690018a
6)
<p>题目数据 <strong>保证</strong> 整个链式结构中不存在环。</p>
<p><strong>注意</strong>，函数返回结果后，链表必须 
<strong>保持其原始结构</strong> 。</p>
<p>&nbsp;</p>
<p><strong>示例 1：</strong></p>
![title](https://leanote.com/api/file/getImage?fileId=60b99c66ab644178690018a
8)
<pre><strong>输入：</strong>intersectVal = 8, listA = [4,1,8,4,5], listB = 
[5,0,1,8,4,5], skipA = 2, skipB = 3
<strong>输出：</strong>Intersected at '8'
<strong>解释：</strong>相交节点的值为 8 （注意，如果两个链表相交则不能为 
0）。
从各自的表头开始算起，链表 A 为 [4,1,8,4,5]，链表 B 为 [5,0,1,8,4,5]。
在 A 中，相交节点前有 2 个节点；在 B 中，相交节点前有 3 个节点。
</pre>
<p><strong>示例&nbsp;2：</strong></p>
![title](https://leanote.com/api/file/getImage?fileId=60b99c9dab644178690018b
3)
<pre><strong>输入：</strong>intersectVal&nbsp;= 2, listA = [0,9,1,2,4], listB 
= [3,2,4], skipA = 3, skipB = 1
<strong>输出：</strong>Intersected at '2'
<strong>解释：</strong>相交节点的值为 2 （注意，如果两个链表相交则不能为 
0）。
从各自的表头开始算起，链表 A 为 [0,9,1,2,4]，链表 B 为 [3,2,4]。
在 A 中，相交节点前有 3 个节点；在 B 中，相交节点前有 1 个节点。
</pre>
<p><strong>示例&nbsp;3：</strong></p>
![title](https://leanote.com/api/file/getImage?fileId=60b99c7aab64417a6000191
7)